From ae7da5d7f38e51b3342be8cd0c72dc9dbabafcfb Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Mon, 25 Jul 2005 21:01:57 +0000 Subject: [PATCH] Don't leave behind zombie device model processes Signed-off-by: Edwin Zhai Signed-off-by: Arun Sharma --- tools/python/xen/xend/image.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 8c8f2027b4..1f1aa34bee 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -352,8 +352,9 @@ class VmxImageHandler(ImageHandler): def destroy(self): channel.eventChannelClose(self.device_channel) - os.system("kill -KILL" - + " %d" % self.pid) + import signal + os.kill(self.pid, signal.SIGKILL) + (pid, status) = os.waitpid(self.pid, 0) def getDomainMemory(self, mem_mb): return (mem_mb * 1024) + self.getPageTableSize(mem_mb) -- 2.30.2